home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / rayfiles / rsdefs / examples / testsurf.ray < prev   
Text File  |  1994-08-09  |  4KB  |  159 lines

  1. /************************************************************************
  2.  *
  3.  *      Testsurf.ray
  4.  *
  5.  *    This is the test scene used to give an idea of what a surface
  6.  *    will look like.  This scene was used in the cataloging of
  7.  *    all the Rayshade Standard Surfaces (RSS).
  8.  *
  9.  *    Please do not edit this file, or any of the other files in
  10.  *    this package!  Make additions to these in your own separate
  11.  *    file.  If you think you have something that should be added
  12.  *    permanently, please send it to Larry Coffin and/or David
  13.  *    DeBry (email addresses listed below).  If we include it in
  14.  *    the next release, we'll put your name in the contributor's
  15.  *    list.
  16.  *
  17.  *      Contributors (in alphabetical order):
  18.  *          Larry Coffin <lcoffin@clciris.chem.umr.edu>
  19.  *          David DeBry <ddebry@dsd.es.com>
  20.  */
  21.  
  22. /* Include the Rayshade Standard (RS) package */
  23.  
  24. #include "defs.rh"
  25.  
  26. /************************************************************************
  27.  *
  28.  * WARNING!  If you try to render this scene with Rayshade, and get an
  29.  *     error on the line that #include's <defs.rh>, the most likely
  30.  *    mistake that you have made is that you MUST put the following
  31.  *    into your Rayshade command line:
  32.  *
  33.  *    -P -I(path to the Rayshade Standard Header Files)
  34.  *
  35.  *    For instance, if you had all the .rh files in     
  36.  *    /usr/people/ddebry/src/include, then you would do this:
  37.  *
  38.  *    -P -I/usr/people/ddebry/src/include
  39.  *
  40.  */
  41.  
  42. /************************************************************************
  43.  * Define a view -- alpha for a quick test
  44.  */
  45.  
  46. RSFtv_alpha()
  47. eyep        0 -30 .8
  48. lookp        0 0 .1
  49.  
  50. /************************************************************************
  51.  * Increase maxdepth so we can see transparencies and reflections 
  52.  */
  53.  
  54. maxdepth    5
  55.  
  56. /************************************************************************
  57.  * define TEST_SURF here as needed 
  58.  */
  59.  
  60. #ifndef TEST_SURF
  61. #define TEST_SURF RSSnavyglass
  62. #endif
  63.  
  64.  
  65. /************************************************************************
  66.  * Create objects that will test the surface
  67.  */
  68.  
  69. name test_objects
  70. list
  71.     sphere TEST_SURF()    1    1.5 0 0
  72.     sphere TEST_SURF()    1    -1.5 0 0
  73.     cylinder TEST_SURF()    .2      -1.5 0 1.4    1.5 0 1.4
  74.     poly TEST_SURF()    -2.5 0 -1.2
  75.             2.5 0 -1.2
  76.             2.5 -.0035 -1.9
  77.             -2.5 -.0035 -1.9
  78. end
  79.  
  80. /************************************************************************
  81.  * Create objects to shadows on the test objects
  82.  */
  83.  
  84. name shadow_objects
  85. list
  86.     cylinder RSStest_black()    .2    2 -2 2.3    2 -2 3.6
  87. end
  88.  
  89. /************************************************************************
  90.  * Create a checkered ground for reflection and transparency checks
  91.  */
  92.  
  93. name floor
  94. list
  95.     plane RSStest_white()    0 0 -7.501    0 0 1
  96.             texture marble
  97.             texture checker RSStest_burgundy()
  98.             RSMscale(6.0)
  99. end
  100.  
  101. /************************************************************************
  102.  * Create objects that will be reflected if reflections are used
  103.  */
  104.  
  105. name reflectance_objects
  106. list
  107.     cylinder RSStest_blue()     4    -15 -35 -7.6    -15 -35 7.6
  108.     cylinder RSStest_green() 4    15 -35 -7.6    15 -35 7.6
  109.     cylinder RSStest_red()     4    0 -35 -7.6    0 -35 7.6
  110. end
  111.  
  112. /************************************************************************
  113.  * Create objects that will show up if test objects are transparent
  114.  */
  115.  
  116. name base_test_cyln
  117. list
  118.         cylinder RSStest_white() .1  -5 3 0  5 3 0
  119. end
  120.  
  121. name transparency_objects
  122. list
  123.         object base_test_cyln
  124.                 translate 0 0 -2
  125.         object base_test_cyln
  126.                 translate 0 0 -1.5
  127.         object base_test_cyln
  128.                 translate 0 0 -1
  129.         object base_test_cyln
  130.                 translate 0 0 -.5
  131.         object base_test_cyln
  132.                 translate 0 0 0
  133.         object base_test_cyln
  134.                 translate 0 0 .5
  135.         object base_test_cyln
  136.                 translate 0 0 1
  137.         object base_test_cyln
  138.                 translate 0 0 1.5
  139.         object base_test_cyln
  140.                 translate 0 0 2
  141. end
  142.  
  143. /************************************************************************
  144.  * Apply all objects 
  145.  */
  146.  
  147. object    floor
  148.  
  149. object    test_objects
  150.  
  151. object    shadow_objects
  152.  
  153. object    reflectance_objects
  154.  
  155. object    transparency_objects
  156.     rotate    0 1 0    45.0
  157.  
  158.  
  159.